/**
 * 找差异 [1,3,5,7] [5, 8] => [1,3,7]
 * @param {Array} arr1
 * @param {Array} arr2
 */
export function diff(arr1, arr2) {
  if (arr1.length === 0) {
    return []
  }
  if (arr2.length === 0) {
    return arr1.slice()
  }

  return arr1.filter((item) => arr2.indexOf(item) === -1)
}
